#include<sys/types.h>
#include<signal.h>
#include"log.hpp"
#include<iostream>
#include<string>
#include<unistd.h>
log l(1);

void Usage()
{
    std::cout << "Usage" << std::endl;
    std::cout << "        " << "./kill -signo pid" << std::endl;
}
int main(int argc, char* argv[])
{
    
    if (argc != 3)
    {
        l(Warning, 18, "输入参数错误，请查阅正确用法");
        Usage();
        exit(-1);
    }

    std::string t = argv[1];
    int signo = -std::stoi(t);
    t = argv[2];
    
    pid_t id = std::stoi(t);
    kill(id, signo);
    return 0;
}